package com.sourcemuch.im.caiba.wxapi;

import android.os.Parcel;

import androidx.annotation.NonNull;

import cn.wildfire.chat.app.extendsion.classes.GsonObject;

/**
 * Create by HEKE, 2019/10/14 14:26
 * TODO 微信授权相关数据信息
 */
public class WXToken extends GsonObject {

    public String access_token;
    public String expires_in;
    public String refresh_token;
    public String openid;
    public String scope;

    public WXToken() {
    }

    protected WXToken(Parcel in) {
        access_token = in.readString();
        expires_in = in.readString();
        refresh_token = in.readString();
        openid = in.readString();
        scope = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(access_token);
        dest.writeString(expires_in);
        dest.writeString(refresh_token);
        dest.writeString(openid);
        dest.writeString(scope);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<WXToken> CREATOR = new Creator<WXToken>() {
        @Override
        public WXToken createFromParcel(Parcel in) {
            return new WXToken(in);
        }

        @Override
        public WXToken[] newArray(int size) {
            return new WXToken[size];
        }
    };

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }

    public String getExpires_in() {
        return expires_in;
    }

    public void setExpires_in(String expires_in) {
        this.expires_in = expires_in;
    }

    public String getRefresh_token() {
        return refresh_token;
    }

    public void setRefresh_token(String refresh_token) {
        this.refresh_token = refresh_token;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    @NonNull
    @Override
    public String toString() {
        return toNormalJson();
    }

}
